package com.lovo;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class Doudizhu  extends Card{



    //弄出五十四张牌
    public  ArrayList<String> init(){
        ArrayList<String> list =new ArrayList();
        String [] number= this.getPoint();
        String [] po=this.getType();
        list.add("大王");
        list.add("小王");
           for (int f=0;f<po.length;f++){
               for (int i=0;i< number.length;i++){

               list.add(po[f]+number[i]);

           }
        }
        for (Object obj:list){
            System.out.println(obj);
        }
return list;
    }
    // 洗牌
    public ArrayList<String> xipai(){
        ArrayList<String> lt = init();
        Collections.shuffle(lt);
        System.out.println(lt);
        return lt;
    }
    // 发牌
    public void fapai(){
        ArrayList<String> lst =xipai();
        System.out.println("张三"+lst.subList(0,17));
        System.out.println("李四"+lst.subList(17,34));
        System.out.println("王五"+lst.subList(34,51));
        System.out.println("底牌"+lst.subList(51,54));

    }
}
